package com.logica.hackthon;

import com.flca.IFlcaStartup;
import com.flca.frw.dao.ConnectionPoolMgr;
import com.flca.frw.dao.IConnectionPoolMgr;
import com.flca.frw.util.IConfigurationHelper;
import com.google.inject.Binder;
import com.google.inject.Module;
import com.google.inject.Scopes;
import com.google.inject.name.Names;
import com.logica.hackthon.dao.impl.PlayerDaoImplJpa;
import com.logica.hackthon.dao.intf.PlayerDaoIntf;
import com.logica.hackthon.service.impl.HackThonServiceImpl;
import com.logica.hackthon.service.intf.HackThonServiceIntf;

public class HackThonTestModule implements Module, HackThonConstants
{
	@Override
	public void configure(Binder b)
	{
		//-- startup engine
		b.bind(IFlcaStartup.class).to(HackThonFlcaStartup.class).in(Scopes.SINGLETON);
		
		//-- ConfigurationHelper
		b.bind(IConfigurationHelper.class).to(HackThonConfighelper.class).in(Scopes.SINGLETON);
		
		b.bind(IConnectionPoolMgr.class).to(ConnectionPoolMgr.class).in(Scopes.SINGLETON);

		b.bindConstant().annotatedWith(Names.named("CONFIG_DIRS")).to(CONFIG_DIRS);
		b.bindConstant().annotatedWith(Names.named( "MAIN_PROPERTIES")).to(MAIN_PROPERTIES);
		
		b.bind(HackThonServiceIntf.class).to(HackThonServiceImpl.class).in(Scopes.SINGLETON);
		
		b.bind(PlayerDaoIntf.class).to(PlayerDaoImplJpa.class);

	}
	
	

}
